package com.itheima.exerciseTest.method30_39.method37;

public class Student {
    private String name;
    private int age;

    // 私有带参构造
    private Student(String name){
        System.out.println("name的值为：" + name);
        System.out.println("private...Strudet...有参构造方法");
    }

    // 公共无参构造
    public Student(){
        System.out.println("public...Student...无参构造方法");
    }

    // 公共带参构造
    public Student(String name, int age){
        System.out.println("name的值为：" + name + "age的值为：" + age);
        System.out.println("public...Student...有参构造方法");
    }
}
